package com.owdp.code.service;

import com.owdp.code.entity.User;
import com.owdp.code.mapper.UserMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("UserService")
public class UserServiceImpl implements UserService {

    @Resource
    UserMapper userMapper;
    @Override
    public String login(String account) {
        return userMapper.findPasswordByAccount(account);
    }

    @Override
    public void regist(User user) {
        userMapper.insert(user);
    }

    @Override
    public int findUserByIdcardANDCpnumber(String idcard, String cpnumber) {
       return userMapper.findUserByIdcardANDCpnumber(idcard,cpnumber);
    }
}
